import Vue from 'vue'
import VueRouter from 'vue-router'
// import First from "../view/First.vue"   
import Two from "../view/Two.vue"
Vue.use(VueRouter)
let routes = [
    {
        path: '/',//这样设置的话我们的页面默认就是我们的First页面
        name: 'First',
        component: ()=>import("../view/First.vue")//这里是用的路由懒加载，提高性能
    },

    {
        path: '/Two?id',
        name: 'Two',
        component: Two
    }
]
let router = new VueRouter({
    routes ,// short for `routes: routes`
    mode:"history",
  })
  export default router//将router暴漏出去，在入口文件里进行引入9